<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // module1 模块1
    export const mod1='111';
    export const mod2='222';
    export const mod3='333';

    // module2 使用
    // 全部引入
    import * as newname from  './module1';
    console.log(newname.mod1);
    // 引入1个
    import mod2 as newname from  './module1';
    console.log(newname.mod2);
    // 引入多个
    import {mod2,mod3} as newname from  './module1';
    console.log(newname.mod2);
</script>
</body>
</html>